/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.RemoteException;
import java.rmi.server.ServerNotActiveException;
import java.util.List;

import middleware.datacontainer.searchclient.ClientContainer;
import application.controller.server.UseCaseControllerClientSearch;
import application.exceptions.InsufficientClientRightsException;
import application.exceptions.SessionException;

/**
 * The Class ClientSearchRemoteImpl.
 */
public class ClientSearchRemoteImpl extends AbstractRemoteImpl implements ClientSearchRemote {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -9143962124497633530L;

	/**
	 * Instantiates a new client search remote impl.
	 * 
	 * @throws RemoteException
	 *             the remote exception
	 */
	protected ClientSearchRemoteImpl() throws RemoteException {
		super();
		_controller = new UseCaseControllerClientSearch();
	}

	/** The _controller. */
	UseCaseControllerClientSearch _controller;

	/* (non-Javadoc)
	 * @see application.server.ClientSearchRemote#searchClient(java.lang.String)
	 */
	@Override
	public List<ClientContainer> searchClient(String sessionId, String searchPattern)
			throws RemoteException, SessionException, InsufficientClientRightsException, ServerNotActiveException {
		return _controller.searchClient(sessionId, "", searchPattern);
	}

}
